<template>
  <div class="father">
    <h3>父组件</h3>
    <div class="content">
      <!--title后接的是普通字符串，加:后接的是变量-->
      <Game>
        <template v-slot="a">
          <ul>
            <li v-for="game in a.games" :key="game.id">{{ game.name }}</li>
          </ul>
        </template>
      </Game>
      <Game>
        <template v-slot="a">
          <ol>
            <li v-for="game in a.games" :key="game.id">{{ game.name }}</li>
          </ol>
        </template>
      </Game>
      <Game>
        <template v-slot="a">
          <h4 v-for="game in a.games" :key="game.id">{{ game.name }}</h4>
        </template>
      </Game>
    </div>
  </div>
</template>

<script setup lang="ts" name="Father">
import { ref } from "vue";
import Game from "./Game.vue";
</script>

<style scoped>
.father {
  background-color: rgb(165, 164, 164);
  padding: 20px;
  border-radius: 10px;
}
.content {
  display: flex;
}
img {
  width: 100%;
}
video {
  width: 100%;
}
h4 {
  font-size: 15px;
  margin: 5px;
}
</style>